package com.wwtech.epp.ui.adapter.work;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wwtech.epp.R;
import com.wwtech.epp.entity.WorkState;

import java.util.List;

/**
 * Created by huzhipeng on 2017/12/18.
 */

public class WorkStateAdapter extends BaseQuickAdapter<WorkState, BaseViewHolder> {

    public WorkStateAdapter(@Nullable List<WorkState> data) {
        super(R.layout.item_work_state, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, WorkState workState) {
        baseViewHolder.setChecked(R.id.check, workState.isCheck())
                .setText(R.id.state, workState.getState());
    }
}
